package com.vf.user.domain.VO;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
@ApiModel(value = "用户微信登录用的vo")
public class UserWxLoginVO{

    @NotNull(message = "微信code不能为空")
    @ApiModelProperty(value = "微信授权码")
    private String code;

    @NotNull(message = "手机号不能为空")
    @Pattern(regexp = "^1[3|4|5|6|7|8|9][0-9]\\d{8}$", message = "手机号格式错误")
    @ApiModelProperty(value = "手机号")
    private String phonenumber;

    @NotNull(message = "密码不能为空")
    @Pattern(
            regexp = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,12}$",
            message = "密码必须6-12位，且必须带大小写英文字母和数字"
    )
    @ApiModelProperty(value = "密码")
    private String password;
}
